Introduction

This is a noweb filter, written in Icon, which adds to noweave the capability of some simple pretty-printing (no indentation or line-breaking!) in code sections. This particular version implements pretty-printing for the Mathematica language. However, the filter is written in a way that should make it easy for someone to change the target language: most of the code is language-independent (in §[*] and on), while the language-dependent code occupies only sections 1 and 2. In fact, what needs to be changed when the language changes is only the [[translation]] table in procedure [[main]], and the definitions of the ``interesting'' tokens in the beginning of §[*]1.

Using this two-part scheme, the language-independent part (which is in file [[lipp.nw]]) has been used with the language-dependent files [[tnw.nw]], [[inw.nw]], and [[mnw.nw]] to implement pretty-printing for the languages Object-Oriented Turing, Icon, and Mathematica.

«*»= «Procedure [[main]]» «Procedure [[filter]]» «Procedure [[TeXify]]» «Global declarations»

@